<template>
  <div class="m-t-20">
    <el-table
      :data="tableData"
      row-key="id"
      border
      :cell-style="{ textAlign: 'center' } as any"
      :header-cell-style="{ textAlign: 'center' } as any"
    >
      <el-table-column prop="name" label="商品名称" />
      <el-table-column prop="sku" label="商品SKU" />
      <el-table-column prop="warehouse" label="仓库" />
      <el-table-column prop="arrival_batch" label="批次" />
      <el-table-column prop="futures" label="类型" />
      <el-table-column prop="currency" label="币种" />
      <el-table-column prop="price" label="价格" />
      <el-table-column prop="num" label="折扣数量" />
      <el-table-column prop="rate" label="折扣率" />
      <el-table-column prop="price" label="折扣价格" />
    </el-table>
  </div>
</template>
<script setup lang="ts">
import { getDetailApi } from '@/api/inventory'
import { useRoute } from 'vue-router'

const { query } = useRoute()
const tableData = ref<any[]>([])

const getInventoryInfo = async () => {
  const res = await getDetailApi(query.id as string)
  //ts-ignore
  tableData.value = res.data
}

getInventoryInfo()
</script>
<style lang="less" scoped></style>
